function Invoke-ForwardIntegration {
<#
.SYNOPSIS
Syncs all changes from TFS server paths mapped to the VolatileEnlistment with the partial branch and local git repository.

.DESCRIPTION
This function performs the following operations:
 - TF undo . /r from the Volatile workspace removing any pending changes (there should not be any since this is not where you work.)
 - TF GET from the Volatile workspace
 - TF undo . /r from the Partial Branch workspace removing any pending changes (there should not be any since this is not where you work.)
 - TF GET from the Partial Branch workspace
 - TF Merge <Volatile Server Branch> <Partial Branch> /r
 - commits the above merge
 - stashes any pending changes in git repo
 - checks out master git branch
 - git-tf pull from the git repo

 If there are any merge conflicts in the TFS merge, you may be prompted to oresolve them. However, if you do all of your work in the git repo, this should not happen.

.LINK
https://BigGit.Codeplex.com
Add-VolitileEnlistment
Add-NonVolitileEnlistment
Add-PartialBranch
Add-PartialBranchGitClone
Invoke-ReverseIntegration
#>   
    $currentDir = Resolve-Path .
    cd (Get-BigGitConfig VolatilePath)
    Write-BigGitMessage "Undoing pending changes in Source branch workspace" -backgroundColor darkgreen
    Invoke-TF undo . /r /noprompt
    Write-BigGitMessage "getting latest for source workspace" -backgroundColor darkgreen
    Invoke-TF get
    cd (Get-BigGitConfig PartialPath)
    Write-BigGitMessage "Undoing pending changes in partial branch workspace" -backgroundColor darkgreen
    Invoke-TF undo . /r /noprompt
    Write-BigGitMessage "getting latest for partial branch workspace" -backgroundColor darkgreen
    Invoke-TF get
    Write-BigGitMessage "Forward integrating into partial branch workspace" -backgroundColor darkgreen
    Invoke-TF merge /r (Get-BigGitConfig SourceBranch) (Get-BigGitConfig PartialBranch)
    Write-BigGitMessage "Checking in changes into partial branch workspace" -backgroundColor darkgreen
    Invoke-TF checkin /comment:"syncing with source branch" /noprompt
    Write-BigGitMessage "Merging changes into git master" -backgroundColor darkgreen
    cd (Get-BigGitConfig GitRepoPath)
    git stash
    git checkout master
    git-tf pull
    cd $currentDir
}